<?php 
/*
* 日志列表
*/
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
<?php
    if($pageurl == Url::logPage()){
        include View::getView('home');
	}else{?>
<div id="middle">
   <div id="left" style="width:605px;">
    <div id="list_categories">
     <div class="active">
       <h2>正在查看 '<?php 
	if ($params[1]=='sort'){ 
		if(isset($_GET['sort'])){
			$sortname= $sort_cache[$_GET['sort']]['sortname'];
		}else{
			foreach($sort_cache as $val){
				if($val['alias']!='' && $params[2]==$val['alias']) $sortname= $val['sortname'];
			}
		}
?>
			<?php echo $sortname;?>
<?php }elseif ($params[1]=='tag'){ ?>
			<?php echo urldecode($params[2]);?>
<?php }elseif($params[1]=='author'){ ?>
			<?php echo blog_author($author);?>
<?php }elseif($params[1]=='keyword'){ ?>
            <?php echo urldecode($params[2]);?>
<?php }elseif($params[1]=='record'){ ?>
            <?php echo substr($params[2],0,4).'年'.substr($params[2],4,2).'月';?>
<?php }else{?><?php }?> '</h2>
     </div>
<?php doAction('index_loglist_top'); ?>
<?php foreach($logs as $key=>$value):
    ?>
<div class="listing">
   <div class="content">
    <div class="left">
     <div class="imgholder">
       <a href="<?php echo $value['log_url']; ?>" title="<?php echo $value['log_title']; ?>" target="_blank">
	   <img src="<?php logs_thumb($value,'276','135'); ?>" 
	   alt="<?php echo $value['log_title']; ?>" class="imgf" /></a>
     </div>
    </div>
    <div class="right">
       <div class="small-desc">
           <h3><a href="<?php echo $value['log_url']; ?>" title="<?php echo $value['log_title']; ?>" target="_blank">
		   <?php echo $value['log_title']; ?></a></h3>
            <p><?php echo extractHtmlData($value['content'],100);?></p>
       </div>
    </div>
   </div>
</div>
<?php if($key=="0"){?>
<div class="listing">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6188876196041059";
/* 爱博客内页 */
google_ad_slot = "5214458922";
google_ad_width = 600;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<?php }?>
<?php endforeach; ?>

<div id="pagenavi">
	<div class="pagenavi"><?php echo $page_url;?></div>	</div>
</div>
</div><!-- #left closer -->

<div id="right-x">
<?php include View::getView('tabs');?>
<div id="lt_300x250_widget-3">
   <h3 class="widget-title"><span class="title">广而告知</span></h3>
   <div id="ad_300">
    <!-- 广告位：300x250-->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6188876196041059";
/* 300x250, 创建于 10-8-6 */
google_ad_slot = "2321441221";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
	</div>
</div>
<?php include View::getView('side');
?>
</div><!-- #right closer -->

<?php
	}include View::getView('footer');
?>